import Vue from 'vue'
import App from '../App'
import { createRouter } from '../router/router'
import { createStore } from '../store/store'
import { initApi } from '../api'

export const createApp = () => {
  const router = createRouter()
  const store = createStore()
  initApi(router)
  const app = new Vue({
    render: h => h(App),
    router,
    store
  })
  return { app, router, store }
}
